@section Styles{
    <link href="//cdn.bootcss.com/Swiper/3.4.2/css/swiper.min.css" rel="stylesheet">
    <style type="text/css">
        .weui-article img {
            max-width: 100%;
            width: 100%;
        }

        .price {
            color: #ff652e;
            display: inline-block;
        }

        .price .number {
            font-size: 1.25rem;
        }

        .avatar {

        }

        .avatar.radius {
            border-radius: 50%;
        }
            .avatar.min {
                width: 1rem;
                height: 1rem;
            }
    </style>
}
<div class="page" id="productView">
    <div class="page__hd">
        <div class="swiper-container" data-space-between='10' data-pagination='.swiper-pagination' data-autoplay="1000">
            <div class="swiper-wrapper">
                <template v-if="product.headerImageIds && product.headerImageIds.length">
                    <div class="swiper-slide" v-for="item in product.headerImageIds">
                        <img :src="getImageUrl(item)" style="width:100%; height: 220px;" alt="">
                    </div>
                </template>
                <template v-else>
                    <div class="swiper-slide">
                        <img src="~/images/placeholder.gif" style="width:100%; height: 220px;" alt="">
                    </div>
                </template>
            </div>
        </div>
        <div>
            <h4>{{product.name}}</h4>
        </div>
        <div class="price">
            <span class="title">价格:</span>
            <span class="number">￥{{product.price}}</span>
        </div>
    </div>
    <div class="page__bd" v-if="product.parameters">
        <div class="weui-loadmore weui-loadmore_line">
            <span class="weui-loadmore__tips">商品参数</span>
        </div>
        <template v-for="(item, index) in product.parameters">
            <div class="weui-flex" v-if="index%2==0">
                <div class="weui-flex__item">{{item.name}}</div>
                <div class="weui-flex__item">{{item.value}}</div>
            </div>
        </template>
    </div>
    <div class="page__bd" v-if="agentInfo">
        <div class="weui-loadmore weui-loadmore_line">
            <span class="weui-loadmore__tips">店长信息</span>
        </div>
        <div class="weui-form-preview__item">
            <label class="weui-form-preview__label">店长:</label>
            <span class="weui-form-preview__value">
                <img :src="getImageUrl(agentInfo.userAvatarId)" class="avatar radius min" alt="{{agentInfo.name}}" />
                {{agentInfo.name}}
            </span>
        </div>
        <div class="weui-form-preview__item">
            <label class="weui-form-preview__label">店长电话:</label>
            <span class="weui-form-preview__value">{{agentInfo.phoneNumber}}</span>
        </div>
        <div class="weui-form-preview__item">
            <label class="weui-form-preview__label">店长微信:</label>
            <span class="weui-form-preview__value">{{agentInfo.weChat}}</span>
        </div>
    </div>
    <div class="page__bd">
        <div class="weui-loadmore weui-loadmore_line">
            <span class="weui-loadmore__tips">商品介绍</span>
        </div>
        <article class="weui-article" v-html="product.graphicContent"></article>
    </div>
</div>
@section Scripts{
    <script src="//cdn.bootcss.com/Swiper/3.4.2/js/swiper.jquery.min.js"></script>
    <script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/swiper.min.js"></script>
    <script src="~/js/micro/product/index.js"></script>
}